From f5cb371891da9ecf4cbca73c3e5f3d4c32c260d6 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Mon, 16 Aug 2004 14:21:43 +0000 Subject: [PATCH] bitkeeper revision 1.1159.32.2 (4120c2f7sV0HlymoiDxvLZkiP1uL_Q) Simplify start_info_t definition. --- .../include/asm-xen/hypervisor.h | 2 +- .../include/asm-xen/suspend.h | 2 +- tools/libxc/xc_linux_build.c | 2 +- tools/libxc/xc_netbsd_build.c | 2 +- xen/include/hypervisor-ifs/hypervisor-if.h | 58 ++++++++----------- .../hypervisor-ifs/io/domain_controller.h | 17 ------ 6 files changed, 28 insertions(+), 55 deletions(-) diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor.h index 5b89913a81..cf9369fd85 100644 --- a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor.h +++ b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor.h @@ -21,7 +21,7 @@ /* arch/xen/i386/kernel/setup.c */ union start_info_union { - extended_start_info_t start_info; + start_info_t start_info; char padding[512]; }; extern union start_info_union start_info_union; diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/suspend.h b/linux-2.6.7-xen-sparse/include/asm-xen/suspend.h index 0a9c8e74a9..937137f005 100644 --- a/linux-2.6.7-xen-sparse/include/asm-xen/suspend.h +++ b/linux-2.6.7-xen-sparse/include/asm-xen/suspend.h @@ -12,7 +12,7 @@ typedef struct suspend_record_st { /* To be filled in before resume. */ - extended_start_info_t resume_info; + start_info_t resume_info; /* * The number of a machine frame containing, in sequence, the number of * each machine frame that contains PFN -> MFN translation table data. diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c index 39dd6c3d08..c272ecb2c2 100644 --- a/tools/libxc/xc_linux_build.c +++ b/tools/libxc/xc_linux_build.c @@ -85,7 +85,7 @@ static int setup_guestos(int xc_handle, unsigned long l2tab; unsigned long l1tab; unsigned long count, i; - extended_start_info_t *start_info; + start_info_t *start_info; shared_info_t *shared_info; mmu_t *mmu = NULL; void *pm_handle=NULL; diff --git a/tools/libxc/xc_netbsd_build.c b/tools/libxc/xc_netbsd_build.c index 41adfa935a..e113726551 100644 --- a/tools/libxc/xc_netbsd_build.c +++ b/tools/libxc/xc_netbsd_build.c @@ -73,7 +73,7 @@ static int setup_guestos(int xc_handle, unsigned long l1tab; unsigned long count, pt_start; unsigned long symtab_addr = 0, symtab_len = 0; - extended_start_info_t *start_info; + start_info_t *start_info; shared_info_t *shared_info; unsigned long ksize; mmu_t *mmu = NULL; diff --git a/xen/include/hypervisor-ifs/hypervisor-if.h b/xen/include/hypervisor-ifs/hypervisor-if.h index bbcbc9f505..1ffbd3773c 100644 --- a/xen/include/hypervisor-ifs/hypervisor-if.h +++ b/xen/include/hypervisor-ifs/hypervisor-if.h @@ -2,6 +2,8 @@ * hypervisor-if.h * * Guest OS interface to Xen. + * + * Copyright (c) 2004, K A Fraser */ #ifndef __HYPERVISOR_IF_H__ @@ -360,47 +362,35 @@ typedef struct shared_info_st * extended by an extra 4MB to ensure this. */ -/* - * This is the basic bootstrap information structure as passed by Xen to the - * initial controller domain. We want this structure to be easily extended by - * more sophisticated domain builders and controllers, so we make the basic - * fields of this structure available via a BASIC_START_INFO macro. - * - * Extended version of start_info_t should be defined as: - * typedef struct { - * BASIC_START_INFO; - * <...extra fields...> - * } extended_start_info_t; - */ #define MAX_CMDLINE 256 -#define BASIC_START_INFO \ - /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ \ - memory_t nr_pages; /* 0: Total pages allocated to this domain. */ \ - _MEMORY_PADDING(A); \ - memory_t shared_info; /* 8: MACHINE address of shared info struct.*/ \ - _MEMORY_PADDING(B); \ - u32 flags; /* 16: SIF_xxx flags. */ \ - u32 __pad; \ - /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ \ - memory_t pt_base; /* 24: VIRTUAL address of page directory. */ \ - _MEMORY_PADDING(C); \ - memory_t nr_pt_frames; /* 32: Number of bootstrap p.t. frames. */ \ - _MEMORY_PADDING(D); \ - memory_t mfn_list; /* 40: VIRTUAL address of page-frame list. */ \ - _MEMORY_PADDING(E); \ - memory_t mod_start; /* 48: VIRTUAL address of pre-loaded module. */ \ - _MEMORY_PADDING(F); \ - memory_t mod_len; /* 56: Size (bytes) of pre-loaded module. */ \ - _MEMORY_PADDING(G); \ - u8 cmd_line[MAX_CMDLINE] /* 64 */ - typedef struct { - BASIC_START_INFO; + /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ + memory_t nr_pages; /* 0: Total pages allocated to this domain. */ + _MEMORY_PADDING(A); + memory_t shared_info; /* 8: MACHINE address of shared info struct.*/ + _MEMORY_PADDING(B); + u32 flags; /* 16: SIF_xxx flags. */ + u16 domain_controller_evtchn; /* 20 */ + u16 __pad; + /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ + memory_t pt_base; /* 24: VIRTUAL address of page directory. */ + _MEMORY_PADDING(C); + memory_t nr_pt_frames; /* 32: Number of bootstrap p.t. frames. */ + _MEMORY_PADDING(D); + memory_t mfn_list; /* 40: VIRTUAL address of page-frame list. */ + _MEMORY_PADDING(E); + memory_t mod_start; /* 48: VIRTUAL address of pre-loaded module. */ + _MEMORY_PADDING(F); + memory_t mod_len; /* 56: Size (bytes) of pre-loaded module. */ + _MEMORY_PADDING(G); + u8 cmd_line[MAX_CMDLINE]; /* 64 */ } PACKED start_info_t; /* 320 bytes */ /* These flags are passed in the 'flags' field of start_info_t. */ #define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */ #define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain? */ +#define SIF_BLK_BE_DOMAIN (1<<4) /* Is this a block backend domain? */ +#define SIF_NET_BE_DOMAIN (1<<5) /* Is this a net backend domain? */ /* For use in guest OSes. */ extern shared_info_t *HYPERVISOR_shared_info; diff --git a/xen/include/hypervisor-ifs/io/domain_controller.h b/xen/include/hypervisor-ifs/io/domain_controller.h index da1f2441de..42eedd945e 100644 --- a/xen/include/hypervisor-ifs/io/domain_controller.h +++ b/xen/include/hypervisor-ifs/io/domain_controller.h @@ -11,23 +11,6 @@ #define __DOMAIN_CONTROLLER_H__ -#ifndef BASIC_START_INFO -#error "Xen header file hypervisor-if.h must already be included here." -#endif - - -/* - * EXTENDED BOOTSTRAP STRUCTURE FOR NEW DOMAINS. - */ - -typedef struct { - BASIC_START_INFO; - u16 domain_controller_evtchn; /* 320 */ -} PACKED extended_start_info_t; /* 322 bytes */ -#define SIF_BLK_BE_DOMAIN (1<<4) /* Is this a block backend domain? */ -#define SIF_NET_BE_DOMAIN (1<<5) /* Is this a net backend domain? */ - - /* * Reason codes for SCHEDOP_shutdown. These are opaque to Xen but may be * interpreted by control software to determine the appropriate action. These -- 2.30.2